<template>
    <div class="My_info">
      <div class="My_myIcon">
        <img class="My_avatar" src="http://liufusong.top:8080/img/profile/avatar.png" alt="icon">
      </div>
      <div class="My_user">
        <div class="My_name">游客</div>
        <van-button type="primary" size="small" @click="goLogin"> 去登录 </van-button>
      </div>
    </div>
</template>

<script>
export default {
  name: 'MyInfo',
  data () {
    return {}
  },
  created () {},
  methods: {
    goLogin () {
      this.$router.push('/login')
    }
  }
}
</script>

<style scoped>
.My_info {
    position: absolute;
    background: #fff;
    width: 74%;
    height: 84%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%)translateY(64%);
    box-shadow: 0 0 10px 3px #ddd;
    margin: 50px auto 0;
    padding: 0 20px;
    text-align: center;
    font-size: 13px;
}
.My_avatar {
    width: 100%;
    border-radius: 50%;
}
.My_myIcon {
    position: relative;
    transform: translateY(-50%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    border: 5px solid #f5f5f5;
    display: inline-block;
    box-shadow: 0 2px 2px #bdbdbd;
}
.My_name {
    margin-top: -17px;
    margin-bottom: 17px;
}
</style>
